package com.gosophia.conferenceManagement.summary.ws;


import java.util.List;

import com.gosophia.commons.exception.BusinessException;
import com.gosophia.commons.exception.ConcurrencyException;
import com.gosophia.commons.exception.ParameterException;
import com.gosophia.commons.exception.TechnicalException;
import com.gosophia.conferenceManagement.common.dto.DocumentDTO;
import com.gosophia.conferenceManagement.common.ws.ConferenceHandleWebService;
import com.gosophia.conferenceManagement.summary.dto.SummaryJobDataDTO;
import com.gosophia.taskManagement.dto.JobDTO;


/**
 * 会议总结sei
 * @author mayue
 *
 */

public interface SummaryWebService extends ConferenceHandleWebService{
    /**
     * 修改SummaryJobData
     * @param summaryJobDataDTO
     * summaryJobDataDTO不能为null
     * jobDTO不能为null
     * jobId不能为null
     */
    public void updateSummaryJobData(SummaryJobDataDTO summaryJobDataDTO)
        throws BusinessException, ParameterException, ConcurrencyException,
        TechnicalException;
    /**
     * 根据jobId查询SummaryJobData
     * @param jobId
     * jobId不能为null
     * @return SummaryJobDataDTO  没有指定jobId的实体时返回null
     */
    public SummaryJobDataDTO findSummaryJobDataByJobDataId(Long jobId) 
        throws BusinessException, ParameterException, ConcurrencyException,
        TechnicalException;
    /**
     * 根据jobId查询上一个SummaryJobData
     * @param jobId
     * jobId不能为null
     * @return SummaryJobDataDTO  没有指定jobId的实体时返回null
     */
    public SummaryJobDataDTO findPreSummaryJobDataByJobDataId(Long jobId) 
        throws BusinessException, ParameterException, ConcurrencyException,
        TechnicalException;
    /**
     * 根据jobId查询指定会议总结的审批的历史记录
     * @param jobId
     * jobId不能为null
     * @return List<JobDTO>  如果没有历史记录则返回null
     * @throws BusinessException 
     */
    public List<JobDTO> findSummaryHistoryByJobId(Long jobId)
        throws BusinessException, ParameterException, ConcurrencyException,
        TechnicalException;
    
    /**
     * 保存或更新summaryJobData
     * @param summaryJobDataDTO:不能为null
     * @param attachements:附件
     * @param onlineDocument:在线文档
     * @throws BusinessException
     * @throws ParameterException
     * @throws ConcurrencyException
     * @throws TechnicalException
     */
    public void saveOrUpdateSummaryJobData(SummaryJobDataDTO summaryJobDataDTO,List<DocumentDTO> attachements, DocumentDTO onlineDocument)
        throws BusinessException, ParameterException, ConcurrencyException,
        TechnicalException;
    
    /**
     * 处理summary流转
     * @param jobId:不能为null
     * @param operatorId:不能为null
     * @param summaryJobDataDTO:不能为null
     * @throws BusinessException
     */
    public void HandleConferenceTurningSummary(Long jobId, Long operatorId,
            SummaryJobDataDTO summaryJobDataDTO)
            throws BusinessException ;
    
    /**
     * 删除指定id的jobData的文档(包括在线和附件)
     * @param jobId:不能为null
     */
    public void deleteAllDocumentById(Long jobId);
    
    /**
     * 处理上一个页面提交的不能修改的附件
     * @param oldDocumentIds
     * @return
     */
    public List<DocumentDTO> dealOldAttachment(List<Long> oldDocumentIds);
    
    /**
     * 自动保存(自动保存时新选择的附件不能进行自动保存)
     * @param summaryJobDataDTO:不能为null
     * @throws BusinessException
     */
    public void autoSaveSummaryJobData(SummaryJobDataDTO summaryJobDataDTO) throws BusinessException;
}
